package com.jrx.anytxn.investor.service;

import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.investor.entity.AmLoanMainInvestorInfo;
import com.jrx.anytxn.investor.entity.TlPaymentInvestorLog;
import com.jrx.anytxn.number.exception.SegmentException;

import java.util.Date;
import java.util.List;

/**
 * @program: anytxn-cf-transaction
 * @description: 资金方还款分配处理
 * @author: xiaoyu.jing
 * @date: 2020-05-22 11:12
 **/
public interface IInvestorDealPaymentService {


    /**
     * 逾期还款还款分配
     * @param paymentLog
     * @param loanMainList
     * @param bussinessDate
     * @throws Exception
     */
    void dealOverPay(TlPaymentInvestorLog paymentLog, List<AmLoanMainInvestorInfo> loanMainList, Date bussinessDate) throws Exception;


    /**
     * 提前结清还款分配
     * @param paymentLog
     * @param loanMainList
     * @param bussinessDate
     * @throws Exception
     */
    void dealPayOff(TlPaymentInvestorLog paymentLog, List<AmLoanMainInvestorInfo> loanMainList, Date bussinessDate) throws Exception;

    /**
     * 正常还款还款分配
     * @param paymentLog
     * @param loanMainList
     * @param bussinessDate
     * @throws Exception
     */
    void dealPay(TlPaymentInvestorLog paymentLog, List<AmLoanMainInvestorInfo> loanMainList, Date bussinessDate) throws Exception;

    /**
     * 提前还款还款分配
     * @param paymentLog
     * @param loanMainList
     * @param bussinessDate
     * @throws Exception
     */
    void dealPrePay(TlPaymentInvestorLog paymentLog, List<AmLoanMainInvestorInfo> loanMainList, Date bussinessDate) throws Exception;

    /**
     * 代偿还款还款分配
     * @param paymentLog
     * @param loanMainList
     * @param bussinessDate
     * @throws Exception
     */
    void dealCmpsPay(TlPaymentInvestorLog paymentLog, List<AmLoanMainInvestorInfo> loanMainList, Date bussinessDate) throws Exception;

    /**
     * 回购还款还款分配
     * @param paymentLog
     * @param loanMainList
     * @param bussinessDate
     * @throws Exception
     */
    void dealCrtPay(TlPaymentInvestorLog paymentLog, List<AmLoanMainInvestorInfo> loanMainList, Date bussinessDate) throws Exception;
}
